#ifndef __FONT_H
#define __FONT_H

#include "FreeRTOS.h"
#include "task.h"

#define VL_MC_105Q 1
#define VL_YT_3578_HD 0

#define Chinese 0
#define English 1

#define ChengDu 1
#define BT656   0


#define LR6000      0
#define SAT_H0610X   0
#define STA_H0306X   1


#define One_S   1
#define Three_S 0

#define Frist_VL 0
#define Frist_IR 1

#define WiFi_Flag 0 //(是否使用WIFI)
#define Power_Flag 1 //(是否控制白光、激光电源)

//拍照控制板
#define Black_Board  0
#define Green_Board 1



#define 	osd_0 							0x30
#define 	osd_1 							0X31
#define		osd_2 							0X32
#define		osd_3 							0X33
#define		osd_4 							0X34
#define		osd_5 							0X35 
#define		osd_6 							0X36 
#define		osd_7 							0X37 
#define		osd_8 							0X38 
#define		osd_9 							0X39 
											
											
#define 	osd_a 							0X61
#define		osd_b 							0X62
#define		osd_c 							0X63
#define		osd_d 							0X64
#define		osd_e 							0X65 
#define		osd_f 							0X66 
#define		osd_g 							0X67 
#define		osd_h 							0X68 
#define		osd_i 							0X69 
#define		osd_j 							0X6A 
#define		osd_k 							0X6B 
#define		osd_l 							0X6C
#define		osd_m 							0X6D
#define		osd_n 							0X6E
#define		osd_o 							0X6F
#define		osd_p 							0X70
#define		osd_q 							0X71
#define		osd_r 							0X72
#define		osd_s 							0X73
#define		osd_t 							0X74 
#define		osd_u 							0X75 
#define		osd_v 							0X76
#define		osd_w 							0X77
#define		osd_x 							0X78
#define		osd_y 							0X79
#define		osd_z 							0X7A 
											
#define 	osd_A 							0X41
#define		osd_B 							0X42
#define		osd_C 							0X43
#define		osd_D 							0X44
#define		osd_E 							0X45 
#define		osd_F 							0X46 
#define		osd_G 							0X47 
#define		osd_H 							0X48 
#define		osd_I 							0X49 
#define		osd_J 							0X4A 
#define		osd_K 							0X4B 
#define		osd_L 							0X4C
#define		osd_M 							0X4D
#define		osd_N 							0X4E
#define		osd_O 							0X4F
#define		osd_P 							0X50
#define		osd_Q 							0X51
#define		osd_R 							0X52
#define		osd_S 							0X53
#define		osd_T 							0X54 
#define		osd_U 							0X55 
#define		osd_V 							0X56
#define		osd_W 							0X57
#define		osd_X 							0X58
#define		osd_Y 							0X5A
#define		osd_Z 							0X5B 

#define		osd_NONE 						0x00

//english
		//12*12
#define osd_IR 								0xC1
#define osd_VL 								0xC2
#define osd_CO 								0xC3
#define osd_LO 								0xC4
#define osd_R_0 							0xC5
#define osd_MO 								0xC6
#define osd_NO 								0xC7
#define osd_DE 								0xC8
#define osd_FO 								0xC9	
#define osd_G_0 							0xCA
#define osd_WH 								0xCB
#define osd_OT 								0xCC
#define osd_RA 								0xCD
#define osd_IN 								0xCE
#define osd_BO 								0xCF
#define osd_W_0 							0xD0
#define osd_0N 								0xD1
#define osd_GH 								0xD2
#define osd_BR 								0xD3
#define osd_I_0 							0xD4
#define osd_BH 								0xD5
#define osd_N_0 							0xD6
#define osd_DD 								0xD7
#define osd_E_0								0xD8
#define osd_PI 								0xD9
#define osd_P_0 							0xDA
#define osd_PC 								0xDB
#define osd_OL 								0xDC
#define osd_OR 								0xDD
#define osd_RE 								0xDE
#define osd_C_0 							0xDF
#define osd_ON 								0xE0
#define osd_OF 								0xE1
#define osd_F_0 							0xE2
					
					
#define osd_EX 								0xE3
#define osd_IT 								0xE4
#define osd_WI 								0xE5		
#define osd_FI 								0xE6
					
#define osd_CR      						0XB1
#define osd_ST      						0XB2
#define osd_DN      						0XB5
#define osd_PO 								0xA0
#define osd_LR 								0xA1
#define osd_DW 								0xB3
#define osd_DR 								0xB4
#define osd_DV      						0XB6
#define osd_AU      						0XB7
#define osd_DA      						0XB9
#define osd_TO      						0XB8
#define osd_Y_0     						0XBA
#define osd_NI      						0XBB
#define osd_MI      						0XBC
#define osd_D_0     						0XBD
#define osd_HI     							0XBE
#define osd_T_0								0XBF
#define osd_G1								0XE7
#define osd_G2								0XE8
#define osd_G3								0XE9
					
#define osd_Cursor 							0x2F
#define osd_Du 								0x20
#define osd_Min 							0x22
#define osd_Sec 							0x26


//chinese
#define	osd_bai							  0x5B  //白
#define	osd_guang							0x5C  //光

#define	osd_hong							0x5D  //红
#define	osd_wai								0x5E  //外
#define	osd_zi								0x5F  //自
#define	osd_dong							0x60  //动
#define	osd_chu				  			0x61  //除
#define	osd_wu				  			0x62  //雾

#define	osd_hei				  			0x63  //黑
#define	osd_liang				  		0x64  //亮
#define	osd_du				  		  0x65  //度
#define	osd_dui				  			0x66  //对
#define	osd_bi				  			0x67  //比
#define	osd_kuan				  		0x68  //宽
#define	osd_tai			  			  0x69  //态
#define	osd_jiang				  		0x6A  //降
#define	osd_zao			  			  0x6B  //噪
#define	osd_di				   			0x6C  //低
#define	osd_zhong				   		0x6D  //中
#define	osd_gao				 			  0x6E  //高
#define	osd_kai				   			0x6F  //开
#define	osd_guan			  	  	0x70  //关
#define	osd_cai				 			  0x71  //彩
#define	osd_se				 			  0x72  //色
#define	osd_mo				 		  	0x73  //模
#define	osd_shi				 			  0x74  //式


/***********Icon*************/
#define	osd_Icon_wifi_1						0xa4
#define	osd_Icon_wifi_2						0xa5
#define	osd_Icon_photo_1					0x11
#define	osd_Icon_photo_2					0x12
#define	osd_Icon_record_1					0x0c
#define	osd_Icon_record_2					0x0d
#define	osd_Icon_Battery_Per0_1				0x01	
#define	osd_Icon_Battery_Per0_2				0x02
#define	osd_Icon_Battery_Per20_1			0x03
#define	osd_Icon_Battery_Per20_2			0x02
#define	osd_Icon_Battery_Per40_1			0x04
#define	osd_Icon_Battery_Per40_2			0x02
#define	osd_Icon_Battery_Per60_1			0x06
#define	osd_Icon_Battery_Per60_2			0x05
#define	osd_Icon_Battery_Per70_1			0x06
#define	osd_Icon_Battery_Per70_2			0x05
#define	osd_Icon_Battery_Per100_1			0x06
#define	osd_Icon_Battery_Per100_2			0x07
#define	osd_Icon_Satellite_1				0x19
#define	osd_Icon_Satellite_2				0x1a
#define	osd_Icon_Forward					0x1b
#define	osd_Icon_Reverse					0x1c
#define osd_Aim_line_1						0X78				
#define osd_Aim_line_2						0X79
#define osd_Aim_line_3						0X88
#define osd_Aim_line_4						0X89

#define	osd_Icon_jian						0x2c
#define	osd_Icon_jia						0x2a
#define	osd_Icon_point						0x2d
#define	osd_Icon_Cursor						0x2f
//激光
#define osd_Icon_Laser_1                    0x15
#define osd_Icon_Laser_2			  		0x16




#define 	LOCAL_SIZE_SMALL 	32
#define 	Addr_SIZE_SMALL 	LOCAL_SIZE_SMALL * 2

#define 	OsdModuleMainPage_Size 			21   //OSD主界面显示的模块数量
#define 	OsdModuleConfigPage_Size 		32   //OSD配置界面显示的模块数量

#define 	EnglishFontStrNum						40
#define 	ChineseFontStrNum						31



extern unsigned char State_Module_addr[];
extern unsigned char State_Module_local[];
/*放大缩小*/
//放大
extern unsigned char _AmplifierReduce_Module_addr[];//显示内容;
extern unsigned char _AmplifierReduce_Module_local[]; //x , y local 显示位置
////缩小
//extern unsigned char Reduce_Module_addr[]; //显示内容
//extern unsigned char Reduce_Module_local[]; //x , y local 显示位置

/*WIFY*/
extern unsigned char Wify_Module_addr[];//显示内容
extern unsigned char Wify_Module_local[]; //x , y local 显示位置

/*拍照/录像*/
//拍照
extern unsigned char PhotoRecord_Module_addr[];//显示内容
extern unsigned char PhotoRecord_Module_local[]; //x , y local 显示位置
////录像
//extern unsigned char Record_Module_addr[];//显示内容
//extern unsigned char Record_Module_local[]; //x , y local 显示位置

//电量
extern unsigned char Power_Module_addr[];//显示内容
extern unsigned char Power_Module_local[]; //x , y local 显示位置

//卫星状态
extern unsigned char Satellite_Module_addr[];//显示内容
extern unsigned char Satellite_Module_local[]; //x , y local 显示位置

//卫星数
extern unsigned char Numllite_Module_addr[];//显示内容
extern unsigned char Numllite_Module_local[]; //x , y local 显示位置

//海拔
extern unsigned char Altitude_Module_addr[];//显示内容
extern unsigned char Altitude_Module_local[]; //x , y local 显示位置

//经度标识
extern unsigned char LongitudeFlag_Module_addr[];//显示内容
extern unsigned char LongitudeFlag_Module_local[]; //x , y local 显示位置

//经度值
extern unsigned char Longitude_Module_addr[];//显示内容
extern unsigned char Longitude_Module_local[]; //x , y local 显示位置

//纬度标识
extern unsigned char LatitudeFlag_Module_addr[];//显示内容
extern unsigned char LatitudeFlag_Module_local[]; //x , y local 显示位置

//纬度值
extern unsigned char Latitude_Module_addr[];//显示内容
extern unsigned char Latitude_Module_local[]; //x , y local 显示位置

///*GPS*/
//extern unsigned char Gps_Module_addr[];//显示内容
//extern unsigned char Gps_Module_local[]; //x , y local 显示位置

/*红外测距*/
extern unsigned char Distance_Module_addr[];//显示内容
extern unsigned char Distance_Module_local[]; //x , y local 显示位置

/*红外测距图标*/
extern unsigned char LaserFlag_Module_addr[];
extern unsigned char LaserFlag_Module_local[]; //x , y local 显示位置

/*方位*/
extern unsigned char Position_Module_addr[];//显示内容
extern unsigned char Position_Module_local[]; //x , y local 显示位置

/*俯仰*/
extern unsigned char Pitch_Module_addr[];//显示内容
extern unsigned char Pitch_Module_local[]; //x , y local 显示位置

//描线
extern unsigned char Aim_line_addr[];
extern unsigned char Aim_line_local[];

extern unsigned char *Digit[];
extern unsigned char *Uppercase_Char[];
extern unsigned char *Lowercase_Char[];
extern unsigned char *English_Font[];
extern unsigned char *Chinese_Font[];
extern unsigned char *ICON[];

//白光颜色模式
extern unsigned char Daylight_ColorMode_Module_addr[];//显示内容
extern unsigned char Daylight_ColorMode_Module_local[]; //x , y local 显示位置

//红外颜色模式
extern unsigned char Infrared_ColorMode_Module_addr[];//显示内容
extern unsigned char Infrared_ColorMode_Module_local[]; //x , y local 显示位置

/*正传反转图标图标*/
extern unsigned char ForwardReverse_Module_addr[];//显示内容
extern unsigned char ForwardReverse_Module_local[]; //x , y local 显示位置

//loading标识
extern unsigned char Loading_Module_addr[];//显示内容
extern unsigned char Loading_Module_local[]; //x , y local 显示位置

//红外电子变倍
extern unsigned char Infrared_Zoom_Module_addr[];
extern unsigned char Infrared_Zoom_Module_local[]; //x , y local 显示位置


//白光电子变倍
extern unsigned char Daylight_Zoom_Module_addr[];//显示内容;
extern unsigned char Daylight_Zoom_Module_local[]; //x , y local 显示位置




///*二级菜单*/
////亮度标识
//extern unsigned char BrightnessFlag_Module_addr[]; //显示内容
//extern unsigned char BrightnessFlag_Module_local[]; //x , y local 显示位置

////亮度值
//extern unsigned char Brightness_Module_addr[];//显示内容
//extern unsigned char Brightness_Module_local[]; //x , y local 显示位置

////对比度标识
//extern unsigned char ContrastRatioFlag_Module_addr[]; //显示内容
//extern unsigned char ContrastRatioFlag_Module_local[]; //x , y local 显示位置

////对比度值
//extern unsigned char ContrastRatio_Module_addr[];//显示内容
//extern unsigned char ContrastRatio_Module_local[];; //x , y local 显示位置

////增强标识
//extern unsigned char EnhanceFlag_Module_addr[];//显示内容
//extern unsigned char EnhanceFlag_Module_local[];; //x , y local 显示位置

////增强值
//extern unsigned char Enhance_Module_addr[]; //显示内容
//extern unsigned char Enhance_Module_local[]; //x , y local 显示位置

////画中画标识
//extern unsigned char PipFlag_Module_addr[]; //显示内容
//extern unsigned char PipFlag_Module_local[]; //x , y local 显示位置

//////画中画值
////extern unsigned char Pip_Module_addr[];
////extern unsigned char Pip_Module_local[];; //x , y local 显示位置

////伪彩标识
//extern unsigned char PolarFlag_Module_addr[];
//extern unsigned char PolarFlag_Module_local[]; //x , y local 显示位置

////伪彩值
//extern unsigned char Polar_Module_addr[];
//extern unsigned char Polar_Module_local[]; //x , y local 显示位置



////录像拍照标识
//extern unsigned char PRFlag_Module_addr[];//显示内容
//extern unsigned char PRFlag_Module_local[]; //x , y local 显示位置

////录像拍照值
//extern unsigned char PR_Module_addr[];//显示内容
//extern unsigned char PR_Module_local[]; //x , y local 显示位置

////Wify标识
//extern unsigned char WiryFlag_Module_addr[];//显示内容
//extern unsigned char WiryFlag_Module_local[]; //x , y local 显示位置

////Wify值
//extern unsigned char Wiry_Module_addr[];//显示内容
//extern unsigned char Wiry_Module_local[]; //x , y local 显示位置

////配置界面移动指示光标
//extern unsigned char Cursor_Module_addr[];//显示内容
//extern unsigned char Cursor_Module_local[]; //x , y local 显示位置

////配置界面移动退出
//extern unsigned char ConfigExit_Module_addr[];//显示内容
//extern unsigned char ConfigExit_Module_local[]; //x , y local 显示位置


/*************红外*********************/
//亮度值
extern unsigned char IR_Brightness_Module_addr[];//显示内容
extern unsigned char IR_Brightness_Module_local[]; //x , y local 显示位置
//亮度标识
extern unsigned char IR_BrightnessFlag_Module_addr[];//显示内容
extern unsigned char IR_BrightnessFlag_Module_local[]; //x , y local 显示位置


//对比度值
extern unsigned char IR_ContrastRatio_Module_addr[];//显示内容
extern unsigned char IR_ContrastRatio_Module_local[]; //x , y local 显示位置
//对比度标识
extern unsigned char IR_ContrastRatioFlag_Module_addr[]; //显示内容
extern unsigned char IR_ContrastRatioFlag_Module_local[]; //x , y local 显示位置

//增强值
extern unsigned char IR_Enhance_Module_addr[];//显示内容
extern unsigned char IR_Enhance_Module_local[]; //x , y local 显示位置
//增强标识
extern unsigned char IR_EnhanceFlag_Module_addr[];//显示内容
extern unsigned char IR_EnhanceFlag_Module_local[]; //x , y local 显示位置

#if ChengDu 
//降噪值
extern unsigned char IR_DNR_Module_addr[];//显示内容
extern unsigned char IR_DNR_Module_local[]; //x , y local 显示位置
//降噪标识
extern unsigned char IR_DNRFlag_Module_addr[];//显示内容
extern unsigned char IR_DNRFlag_Module_local[]; //x , y local 显示位置
#elif BT656 
//户外模式
extern unsigned char IR_OutDoor_Module_addr[];//显示内容
extern unsigned char IR_OutDoor_Module_local[]; //x , y local 显示位置
//户外模式标识
extern unsigned char IR_OutDoorFlag_Module_addr[];//显示内容
extern unsigned char IR_OutDoorFlag_Module_local[]; //x , y local 显示位置



#endif


//极性值
extern unsigned char IR_Polar_Module_addr[];//显示内容
extern unsigned char IR_Polar_Module_local[]; //x , y local 显示位置
//极性标识
extern unsigned char IR_PolarFlag_Module_addr[];//显示内容
extern unsigned char IR_PolarFlag_Module_local[]; //x , y local 显示位置

//录像值
extern unsigned char IR_PR_Module_addr[];//显示内容
extern unsigned char IR_PR_Module_local[]; //x , y local 显示位置
//录像标识
extern unsigned char IR_PRFlag_Module_addr[]; //显示内容
extern unsigned char IR_PRFlag_Module_local[]; //x , y local 显示位置

#if WiFi_Flag
//wifi值
extern unsigned char IR_Wifi_Module_addr[];//显示内容
extern unsigned char IR_Wifi_Module_local[]; //x , y local 显示位置
//wifi标识
extern unsigned char IR_WifiFlag_Module_addr[];//显示内容
extern unsigned char IR_WifiFlag_Module_local[]; //x , y local 显示位置
#endif

//退出
extern unsigned char IR_Exit_Module_addr[];//显示内容
extern unsigned char IR_Exit_Module_local[]; //x , y local 显示位置

//光标
extern unsigned char IR_Cursor_Module_addr[];//显示内容
extern unsigned char IR_Cursor_Module_local[]; //x , y local 显示位置

/***********VL***************************/
//亮度值
extern unsigned char VL_Brightness_Module_addr[];//显示内容
extern unsigned char VL_Brightness_Module_local[]; //x , y local 显示位置
//亮度标识
extern unsigned char VL_BrightnessFlag_Module_addr[];//显示内容
extern unsigned char VL_BrightnessFlag_Module_local[]; //x , y local 显示位置

//对比值
extern unsigned char VL_ContrastRatio_Module_addr[]; //显示内容;
extern unsigned char VL_ContrastRatio_Module_local[]; //x , y local 显示位置
//对比标识
extern unsigned char VL_ContrastRatioFlag_Module_addr[];//显示内容
extern unsigned char VL_ContrastRatioFlag_Module_local[]; //x , y local 显示位置

//模式
extern unsigned char VL_Mode_Module_addr[];//显示内容
extern unsigned char VL_Mode_Module_local[]; //x , y local 显示位置
//模式标识
extern unsigned char VL_ModeFlag_Module_addr[];//显示内容
extern unsigned char VL_ModeFlag_Module_local[]; //x , y local 显示位置

//动态范围
extern unsigned char VL_DWDR_Module_addr[];//显示内容
extern unsigned char VL_DWDR_Module_local[]; //x , y local 显示位置
//动态范围标识
extern unsigned char VL_DWDRFlag_Module_addr[];//显示内容
extern unsigned char VL_DWDRFlag_Module_local[]; //x , y local 显示位置

//降噪
extern unsigned char VL_DNR_Module_addr[];//显示内容
extern unsigned char VL_DNR_Module_local[]; //x , y local 显示位置
//降噪标识
extern unsigned char VL_DNRFlag_Module_addr[];//显示内容
extern unsigned char VL_DNRFlag_Module_local[]; //x , y local 显示位置

//录像
extern unsigned char VL_PR_Module_addr[];//显示内容
extern unsigned char VL_PR_Module_local[]; //x , y local 显示位置
//录像标识
extern unsigned char VL_PRFlag_Module_addr[];//显示内容
extern unsigned char VL_PRFlag_Module_local[]; //x , y local 显示位置

#if WiFi_Flag
//wifi
extern unsigned char VL_Wifi_Module_addr[];//显示内容
extern unsigned char VL_Wifi_Module_local[]; //x , y local 显示位置
//wifi标识
extern unsigned char VL_WifiFlag_Module_addr[];//显示内容
extern unsigned char VL_WifiFlag_Module_local[]; //x , y local 显示位置
#endif
//退出
extern unsigned char VL_Exit_Module_addr[];//显示内容
extern unsigned char VL_Exit_Module_local[]; //x , y local 显示位置

//光标
extern unsigned char VL_Cursor_Module_addr[];//显示内容
extern unsigned char VL_Cursor_Module_local[]; //x , y local 显示位置

//后面如若要加新元素 改 #define OsdModuleMainPage_Size 20
typedef enum {
	/*一级菜单*/
	_State = 0, 					//状态

#if	WiFi_Flag
	_Wifi,								//Wify
#endif
	_PhotoRecord,					//照片
//	_Record,						//录像
	_Power,								//电量
	_Satellite,						//卫星状态 5
	_Numllite,						//卫星数量
	_Altitude,						//海拔
	_LongitudeFlag,				//经度标识 E/W
	_Longitude, 					//经度值
	_LatitudeFlag,				//纬度标识 N/S 10
	_Latitude,						//纬度值
	//_Gps,									//GPS
	_Position,						//方位 12
	_Pitch,								//俯仰
	_ForwardReverse,		//电机正反转图标
	
	_Daylight_ColorMode,	//白光颜色模式
	_Infrared_ColorMode,	//红外颜色模式 16
	_Distance,						//红外测距
	_Loading,
	_AimLine,             //描线
	_LaserFlag,           //激光图标

}_OsdModuleindex;
extern _OsdModuleindex OsdModuleindex;

/*配置界面配置参数*/
typedef enum {
	//IR
	_IR_Brightness = OsdModuleMainPage_Size,					//亮度 20
	_IR_BrightnessFlag,			//亮度标识 
	_IR_ContrastRatio,			//对比度
	_IR_ContrastRatioFlag,	//对比度标识
	_IR_Enhance,						//增强
	_IR_EnhanceFlag,				//增强标识
	
#if ChengDu 	
	_IR_DNR,								//降噪
	_IR_DNRFlag,						//降噪标识
#elif BT656 
	_IR_OutDoor,
	_IR_OutDoorFlag,

#endif	
	
	_IR_Polar,							//极性
	_IR_PolarFlag,					//极性标识
//	_Pip,									//画中画
//	_PipFlag,							//画中画标识
	_IR_PR,									//录像
	_IR_PRFlag,							//录像标识
#if WiFi_Flag	
	_IR_Wifi,					//Wify
	_IR_WifiFlag,						//Wify标识
#endif
	//_IR_Exit,					//退出
	_IR_Cursor,							//光标
	_IR_Zoom,						//红外电子变倍
	
	//VL
	_VL_Brightness,					//亮度
	_VL_BrightnessFlag,			//亮度标识 
	_VL_ContrastRatio,			//对比度
	_VL_ContrastRatioFlag,	//对比度标识
	_VL_Mode,								//模式
	_VL_ModeFlag,						//模式标识
	_VL_DWDR,								//动态范围
	_VL_DWDRFlag,						//动态范围标识
	_VL_DNR,								//降噪
	_VL_DNRFlag,						//降噪标识
	_VL_PR,									//录像
	_VL_PRFlag,							//录像标识
#if WiFi_Flag	
	_VL_Wifi,					//Wify
	_VL_WifiFlag,						//Wify标识
#endif
	//_VL_Exit,					//退出
	_VL_Cursor,							//光标    19+30
	_VL_Zoom,						//白光电子变倍


}_ConfigMenuPra;
extern _ConfigMenuPra	ConfigMenuPra;


enum OsdRefresh_Flag {
	Refresh_no,
	Refresh_yes,
};

enum _SwitchState {
	StateOn,
	StateOff,
};

typedef struct 
{
	enum OsdRefresh_Flag Refresh_Flag;
	enum _SwitchState SwitchState;
	unsigned char Module_local[LOCAL_SIZE_SMALL]; //x , y local 显示位置
	unsigned char Module_Property;								//显示属性
	unsigned char Module_addr[Addr_SIZE_SMALL];		//显示内容字符串
	unsigned short int Data;		//显示内容十进制数
}OsdRefresh_Struct;



extern unsigned char charset_array_NONE[];

extern OsdRefresh_Struct  OsdRefresh_Family[OsdModuleMainPage_Size + OsdModuleConfigPage_Size];

extern unsigned char _FontALL[];

#endif
